package com.lysj.food.food.domain;

import com.lysj.admin.utils.annotation.Relation;
import com.lysj.admin.utils.spring.foundation.base.BaseEntity;
import com.lysj.admin.utils.spring.foundation.jpa.RelationType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;

/**
 * @author Created by wtl on 2019-03-19 16:00:45
 * @description 菜品
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@Table(name = "lysj_food_food")
public class Food extends BaseEntity {

    private String storeId; // 门店id
    private String foodTypeId; // 菜品类型id
    @Relation(idProperty = "foodTypeId", serviceName = "foodTypeService", relationType = RelationType.ONE)
    private FoodType foodType;
    private String areaId; // 区域id
    @Transient
    private String areaName; // 区域名称
    private String kouWeiIds; // 口味ids
    private String zuoFaIds; // 做法ids
    private String chengZhongIds; // 称重ids
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal boxFee; // 餐盒费
    private Integer inventory; // 库存
    private Integer category; // 菜品类别，1-无，2-辅菜，3-主菜，4-茶座费

    private String onSale; // 菜品上架,1-堂食上架 2-外卖上架

    private String photoId; // 图片

    @Transient
    private String foodGuiges;  //菜品跟规格



}